from animal_demo import Animal

class BlackDog(Animal):
    # pass
    black_dog_ethnic = "黑狗"

    def black_dog_speak(self):
        print("黑狗叫，忘乌忘乌")

    def introduce(self):  # 重写父类的introduce方法，重写需要满足方法名和父类一致
        super().introduce()
        print("我是一只小黑狗")

    def fun(self,name,speak,habit):
        super().fun(name,speak,habit)
        print("我是一只黑狗，我叫{},我这样叫：{}，我喜欢吃{}".format(name,speak,habit))